package com.xpfirst.arm;

import com.xpfirst.ActivityManage;

import android.os.Bundle;
import android.os.Message;
import android.util.Log;

public class ARMＴemp implements Runnable{
    public ARMJNI armjni;
    public int fd;
    public String temp;
    public String oldTemp;
	public void run() {
    	fd = armjni.openTemp();
    	Log.v("open temp", String.valueOf(fd));
		while(true){
			temp = armjni.ReadTemp();
			if(!(temp.equals(oldTemp))){
				oldTemp = temp;
				//temp = temp.substring(0,4);
				try{
				      Thread.sleep(1000);
	                  ActivityManage.sendMsg(0, "temp", temp);
	                  
				}catch(Exception e){}
			}
		}
	}
}
